import { Component, OnInit } from '@angular/core';
import { TagItem } from '@iux/live';

@Component({
  selector: 'app-demo2',
  templateUrl: './demo2.component.html',
  styles: []
})
export class Demo2Component implements OnInit {

  data: TagItem[];

  constructor() { }

  ngOnInit() {
    this.initData();
  }

  initData() {
    this.data = this.initTag(10);
  }

  initTag(length: number = 10) {
    return Array.from({ length }).map((item, key) => ({
      label: `Tag${key + 1}`,
      removable: true,
    }));
  }
}
